import req from "@/uni-sdk/request/request.js";

const Api = {
	address: "mall-ums/app-api/v1/addresses",
};

export function listContactAddresses(globalLoading) {
	return req.commonGet(Api.address, globalLoading);
}

export function saveContactAddress(data) {
	return req.commonPost(Api.address, data, true)
}

export function updateContactAddress(data) {
	return req.put({
		url: Api.address,
		data,
	}, {
		useGlobalLoading: true,
	})
}

export function deleteContactAddressById(id) {
	return req.delete({
		url: Api.address + "/" + id,
	}, {
		useGlobalLoading: true
	});
}
